package coupons

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type PointsCouponsRouter struct {}

// InitPointsCouponsRouter 初始化 pointsCoupons表 路由信息
func (s *PointsCouponsRouter) InitPointsCouponsRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	pointsCouponsRouter := Router.Group("pointsCoupons").Use(middleware.OperationRecord())
	pointsCouponsRouterWithoutRecord := Router.Group("pointsCoupons")
	pointsCouponsRouterWithoutAuth := PublicRouter.Group("pointsCoupons")
	{
		pointsCouponsRouter.POST("createPointsCoupons", pointsCouponsApi.CreatePointsCoupons)   // 新建pointsCoupons表
		pointsCouponsRouter.DELETE("deletePointsCoupons", pointsCouponsApi.DeletePointsCoupons) // 删除pointsCoupons表
		pointsCouponsRouter.DELETE("deletePointsCouponsByIds", pointsCouponsApi.DeletePointsCouponsByIds) // 批量删除pointsCoupons表
		pointsCouponsRouter.PUT("updatePointsCoupons", pointsCouponsApi.UpdatePointsCoupons)    // 更新pointsCoupons表
	}
	{
		pointsCouponsRouterWithoutRecord.GET("findPointsCoupons", pointsCouponsApi.FindPointsCoupons)        // 根据ID获取pointsCoupons表
		pointsCouponsRouterWithoutRecord.GET("getPointsCouponsList", pointsCouponsApi.GetPointsCouponsList)  // 获取pointsCoupons表列表
	}
	{
	    pointsCouponsRouterWithoutAuth.GET("getPointsCouponsPublic", pointsCouponsApi.GetPointsCouponsPublic)  // pointsCoupons表开放接口
	}
}
